/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package muddb.entities;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;


/**
 *
 * @author keith
 */
@Embeddable
public class SkillPK implements Serializable {
  @Column( name = "skill_id", nullable = false )
  private int skillId;
  @Column( name = "skill_grp_id", nullable = false )
  private int skillGrpId;


  public SkillPK() {
  }


  public SkillPK( int skillId, int skillGrpId ) {
    this.skillId = skillId;
    this.skillGrpId = skillGrpId;
  }


  public int getSkillId() {
    return skillId;
  }


  public void setSkillId( int skillId ) {
    this.skillId = skillId;
  }


  public int getSkillGrpId() {
    return skillGrpId;
  }


  public void setSkillGrpId( int skillGrpId ) {
    this.skillGrpId = skillGrpId;
  }


  @Override
  public int hashCode() {
    int hash = 0;
    hash += (int) skillId;
    hash += (int) skillGrpId;
    return hash;
  }


  @Override
  public boolean equals( Object object ) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if ( !( object instanceof SkillPK ) ) {
      return false;
    }
    SkillPK other = (SkillPK) object;
    if ( this.skillId != other.skillId ) {
      return false;
    }
    if ( this.skillGrpId != other.skillGrpId ) {
      return false;
    }
    return true;
  }


  @Override
  public String toString() {
    return "muddb.entities.SkillPK[skillId=" + skillId + ", skillGrpId=" + skillGrpId + "]";
  }

}
